<%-- 
    Document   : TechnicienInfo
    Created on : 27-avr.-2008, 17:12:06
    Author     : Laurent P.
--%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@page contentType="text/html" pageEncoding="UTF-8"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title> ElectricServices Web - Liste des interventions</title>
        <style type="text/css">
          <!--
            .styleHeader {
                    color: #FFFFFF;
                    font-weight: bold;
            }
            -->
        </style>

        </head>
<body>

    <p>&nbsp;</p>
    
    <table width="90%" border="4" align="center" cellpadding="0" cellspacing="0" bordercolor="#1071A5">
      <tr bgcolor="#1071A5">
        <td background="img/ligne.png">
            <table width="100%" border="0" cellpadding="0" cellspacing="0">
                <tr><td rowspan="2"><img src="img/liste.png" alt="liste" width="405" height="62"></td>
                <form action = "LogOut" method="POST"><td valign="top" align="right"><img src="img/logout.png" alt="Déconnecter" width="40" height="31" onclick="submit()"></td></form>
            </tr><tr>
                <form action = "Refresh" method="POST"><td valign="bottom" align="right"><img src="img/refresh.png" alt="Actualisé" width="40" height="31" onclick="submit()"></td></form>
        </tr> </table>
        </td>
      </tr>
      <tr>
        <td valign="top" background="img/fondln1.png"><br>
            
            <table width="95%" border="1" align="center" cellpadding="2" cellspacing="0" bordercolor="#1071A5">
          <tr>
              <td align="center" bgcolor="#1071A5" class="styleHeader">${technicien.nom} ${technicien.prenom} - ${technicien.matricule}</td>
          </tr>
        </table>
        <br>
        <table width="95%" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#1071A5">
        <tr valign="top"><td valign="top">
        <table width="100%" align="center" cellpadding="6" cellspacing="0">
          <tr bgcolor="#1071A5" class="styleHeader">
            <td><div align="center" >N. intervention</div></td>
            <td><div align="center">Date intervention</div></td>
            <td><div align="center">Nom société</div></td>
            <td><div align="center">Nom</div></td>
            <td><div align="center">Prénom</div></td>
            <td><div align="center">Rue</div></td>
            <td><div align="center">Numéro</div></td>
            <td><div align="center">Code postal</div></td>
            <td><div align="center">ville</div></td>
            <td><div align="center">Téléphone/GSM</div></td>
            <td><div align="center">Priorité intervention</div></td>
            <td><div align="center">Statut</div></td>
          </tr>
          <%! int mat=0; %> <% mat=0; %>
          <c:forEach  var="intr" items="${technicien.listeIInterventionsToday}">               
                      <% out.print("<form name='form"); %>${intr.idIntervention}<% out.print("' action = 'Intervention' method='POST'>"); %>             	       
                          <% if(mat==0) {
                              out.print("<tr onclick='submit()'> ");
                              mat=1;
                             } else {
                              out.print("<tr bgcolor='lightsteelblue' onclick='submit()'>");
                                 mat=0;
                             }%>
                          
                              <td><div align="center"><a href='#' class="id" onclick="submit()">${intr.idIntervention}</a></div></td> 
                              <td>${intr.dateInterventionString}</td>
                           <c:forEach  var="listeS" items="${listeClientSociete}">              
                               <c:if test="${listeS.idClient == intr.IClient.idClient}">
                                    <td>${listeS.nomSociete}</td>
                               </c:if>
                           </c:forEach>  
                           <c:forEach  var="listeP" items="${listeParticulier}">
                               <c:if test="${listeP.idClient==intr.IClient.idClient}">
                                    <td>--</td>                                   
                               </c:if>
                           </c:forEach>  
                            <td>${intr.IClient.nom}</td>
                            <td>${intr.IClient.prenom}</td>
                           <td>${intr.IAdresse.rue}</td>
                           <td>${intr.IAdresse.numero}</td>
                           <td>${intr.IAdresse.ICodePostal.codePostal}</td>
                           <td>${intr.IAdresse.ICodePostal.ville}</td>
                           <td>${intr.IClient.telephone}</td>
                           <td>${intr.prioriteIntervention}</td>
                           <td><c:choose>
                                    <c:when test="${intr.IStatut == 'PL'}">
                                        Planifiée
                                    </c:when>
                                    <c:when test="${intr.IStatut == 'EN'}">
                                        En cours
                                    </c:when>
                                    <c:otherwise>
                                        ?
                                    </c:otherwise>
                               </c:choose>
                               <input name="identifiant" type ="hidden" value="${intr.idIntervention}">
                               </td>                    	
                      <% out.print("</tr>"); %>
                             
                      <% out.print("</form>"); %>  
          </c:forEach>     
</table>
  </td>
</tr></table><br>
</td>
      </tr>
    </table>
    
    <p>&nbsp;</p>
  <p>&nbsp;</p>
    <p>&nbsp;</p>

</body>
</html>
